package model.commands.environment;

import java.util.List;
import model.Environment;
import model.SyntaxErrorException;
import model.commands.Command;

/**
 * Name: 
 * CREATE id
 * 
 * Description:
 * Creates a new turtle with specified id
 * 
 * @author Erick Gonzalez
 */
public class CreateTurtleCommand extends Command {

    @Override
    public int evaluate (Environment e) throws SyntaxErrorException {
        List<Command> arguments = getArguments();
        int id = arguments.get(0).evaluate(e);
        e.addCommandable(id);
        return id;
    }
    
}
